package com.kalaqia.arouter.library;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.text.TextUtils;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;

/**
 * function:
 * project:ARouterLibrary
 * describe:
 * created owner:kalaqia 421407393@qq.com
 * created date:2017/9/15 15:59
 */
//<editor-fold desc="version update log">
// updare owner:kalaqia  421407393@qq.com
// update datetime:2017/9/15 15:59 
// update remark:
//</editor-fold>
@Route(path = "/main/demo")
public class DemoActivity extends AppCompatActivity {

    @Autowired(required = true)
    protected String name;

    @Autowired
    protected String appendName;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        StringBuilder builder = new StringBuilder();
        builder.append(name);
        if (!TextUtils.isEmpty(appendName)) {
            builder.append(appendName);
        }
        ((TextView) findViewById(R.id.btn)).setText(builder.toString());
    }
}
